package descentFly.away3D4.element
{
	import away3d.materials.MaterialBase;
	import away3d.primitives.PrimitiveBase;
	import away3d.primitives.Sphere;
	
	import descentFly.away3D4.df_awaySpace;
	import descentFly.away3D4.df_awayUtils;
	import descentFly.df_utils;
	
	import flash.geom.Matrix3D;
	
	public class df_sphereElement extends df_element {
		public function df_sphereElement(mat:Matrix3D, a_space:df_awaySpace, a_options:Object) {
			super(mat, a_space, a_options);
		}
		
		override protected function modelInit(mat: Matrix3D): void {
			df_awayUtils.createMaterial(options.material, function(material: MaterialBase): void {
				var priminite: PrimitiveBase = new Sphere(material, options.radius);
				priminite.transform = mat;
				setModel(priminite);
			});
			
		}
	}
}